# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: G_Syme <demichan@mail.upb.de>

pkgname=libass
pkgver=0.17.1
pkgrel=2
pkgdesc='A portable library for SSA/ASS subtitles rendering'
arch=(loong64 x86_64)
url=https://github.com/libass/libass/
license=(BSD)
depends=(
  fontconfig
  fribidi
  glibc
  harfbuzz
  libfreetype.so
  libunibreak
)
makedepends=(
  git
  nasm
)
provides=(libass.so)
_tag=915599d88e951e34079383cf926d2731bb45cea1
source=(git+https://github.com/libass/libass.git?signed#tag=${_tag})
validpgpkeys=(
  5458C3100671F252B0F4C7708079D18C21AAAAFF # Oleg Oshmyan (Chortos-2) <chortos@inbox.lv>
  5EE63F2A71BF132CFE3567E1DFFE615F2824C720 # Oneric <oneric@oneric.de>
)
b2sums=(SKIP)

prepare() {
  cd libass
  ./autogen.sh
}

pkgver() {
  cd libass
  git describe --tags
}

build() {
  cd libass
  ./configure \
    --prefix=/usr \
    --enable-fontconfig \
    --enable-libunibreak
  make
}

package() {
  cd libass
  make DESTDIR="${pkgdir}" install
  install -Dm 644 COPYING -t "${pkgdir}"/usr/share/licenses/libass/
}

# vim: ts=2 sw=2 et:
